package flexconsole.controller {
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	import mx.logging.ILogger;
	import mx.logging.Log;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * Startup command for the application.
	 * @author ivanchoo
	 *
	 */
	public class HelpCommand extends SimpleCommand {
		
		static public const HELP_URL:String = "http://code.google.com/p/flex-console/wiki/Help";
		
		static private var logger:ILogger = Log.getLogger("flexconsole.controller.HelpCommand");
		
		override public function execute(notification:INotification):void {
			logger.debug("execute({0})", notification);
			super.execute(notification);
			
			//   Shutdown sequence
			try {
				var urlRequest:URLRequest = new URLRequest(HELP_URL);
				navigateToURL(urlRequest, "_help");
			} catch (e:Error) {
				logger.error(e.message);
			}
		}
	}
}